package com.deyuanyun.pic.ctrl.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.deyuanyun.pic.business.domain.MileagePoint;

/**
 * 腐蚀控制很底层的Mapper
 * 
 * @author ChenKui
 *
 */
public interface CtrlBaseMapper {

    /**
     * 查询有附近测试桩的表
     * 
     * 意思就是有这四个字段的表名
     * 
     * NAGM、NAGM_MILEAGE、MILEAGE、PIPE_LINE_ID
     * @param prefix
     * @return
     */
    public String[] queryTableColumns(@Param("prefix")String prefix);
    
    /**
     * 查询绝对距离
     * @param tableName
     * @param prefix
     * @param pipeLineId
     * @return
     */
    List<MileagePoint> queryMileage(@Param("tableName")String tableName
            ,@Param("prefix")String prefix,@Param("pipeLineId")String pipeLineId);
    
    
    /**
     * 修改附近测试桩
     * @param tableName
     * @param prefix
     * @param id
     * @param nagmId
     * @param nagmMileage
     * @return
     */
    long updateNagmStation(@Param("tableName")String tableName
            ,@Param("prefix")String prefix,@Param("id")String id
            ,@Param("nagmId")String nagmId,@Param("nagmMileage")Long nagmMileage);
    
}
